package top.api.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import top.api.common.ResponseResult;
import top.api.service.OssUploadService;

@RestController
@Api(tags = "上传")
public class UploadController {
    @Autowired
    private OssUploadService ossUploadService;

    @PostMapping("/upload")
    @ApiOperation(value = "图片上传")
    public ResponseResult uploadImg(MultipartFile img){
        return ossUploadService.uploadImg(img);
    }
}
